<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<div class="left">
<?php foreach($db as $id=>$d):?>
	<li>
		<?php 
		// 判断数组中存在数值 
		if(in_array($id,$_SESSION['history'])):?>

			<?php echo $d['title'];?>

			<img src="<?php echo $d['thumb'];?>" width="100" alt="">

		<?php endif;?>
	</li>
<?php endforeach;?>
</div>



<div class="goods">
	<h1><?php echo $goods['title'];?></h1>
	<img src="<?php echo $goods['thumb'];?>" alt="">
	<p>
		<?php echo $goods['body'];?>
	</p>
	</div>
<style type="text/css">
	
	div.left{
		width:30%;
		float:left;
	}
	div.goods{
		float:right;
		width:60%;
	}
</style>
</body>
</html>